#ifndef FFMPEGEXTRA_EYERWASMEVENTXMLHTTPREQUEST_HPP
#define FFMPEGEXTRA_EYERWASMEVENTXMLHTTPREQUEST_HPP

#include <string>

#include "EyerWASMCommon/EyerWASMEvent.hpp"

namespace Eyer
{
    class EyerWASMEventXMLHttpRequest : public EyerWASMEvent
    {
    public:
        EyerWASMEventXMLHttpRequest(const std::string & _url);
        ~EyerWASMEventXMLHttpRequest();

        virtual int Run() override;

        int EyerWASMEvent_XMLHttpRequest_Send_On_DONE(int httpStatus, uint8_t * data, int len);

    private:
        std::string url = "";

    public:
        int httpStatus = -1;
        uint8_t * data = nullptr;
        int len = 0;
    };
}

#endif //FFMPEGEXTRA_EYERWASMEVENTXMLHTTPREQUEST_HPP
